#include "SV.cpp"
#include <conio.h>
void main()
{
 int i,j, n=3;
 char t[10],l[10];
 int hp,hb,dtb;
 SVCQ *a[3],*tg;
 for(i=0;i<n;i++)
 {
	 cout<<"\n Nhap sv thu "<<i+1<<" ";
	 cout<<"\n Nhap Ten: ";gets(t);
	 cout<<"\n Nhap Lop: ";gets(l);
	 cout<<"\n Nhap hoc Phi: ";cin>>hp;
	 cout<<"\n Nhap Diem TB: ";cin>>dtb;
	 cout<<"\n Nhap hoc Bong: ";cin>>hb;
	 a[i]=new SVCQ(t,l,hp,dtb,hb);
 }
 cout<<"\n\n Thong tin sv truoc khi sap xep: ";
 for(i=0;i<n;i++)
 a[i]->display();
 for(i=0;i<n-1;i++)
   for(j=i+1;j<n;j++)
	if(*a[j]>*a[i])
		{
		 tg=a[i];
		 a[i]=a[j];
		 a[j]=tg;
		}
 cout<<"\n --------------------";
 cout<<"\n\n Thong tin sap xep giam dan theo Diem TB: ";
 for(i=0;i<n;i++)
 a[i]->display();
 _getch();
}


